package org.hawk.gwtppc.webtest.tests.fieldsuite;

import org.hawk.gwtppc.webtest.common.Asserts;
import org.hawk.gwtppc.webtest.common.Test;
import org.hawk.gwtppc.webtest.tests.mock.ClassMock;
import org.hawk.gwtppc.webtest.tests.mock.EnumMock;
import org.hawk.gwtppc.webtest.tests.mock.InterfaceMock;
import org.hawk.gwtppc.webtest.tests.mock.SubClassMock1;

public class GetDeclaringClassTest implements Test {

	public void run() throws Throwable {
		Asserts.assertEquals(SubClassMock1.class.getDeclaredField("serialVersionUID").getDeclaringClass(), SubClassMock1.class);
		Asserts.assertEquals(SubClassMock1.class.getDeclaredField("staticString").getDeclaringClass(), SubClassMock1.class);
		Asserts.assertEquals(SubClassMock1.class.getField("switcher").getDeclaringClass(), ClassMock.class);
		Asserts.assertEquals(SubClassMock1.class.getField("values").getDeclaringClass(), InterfaceMock.class);
		Asserts.assertEquals(EnumMock.class.getField("ALPHA").getDeclaringClass(), EnumMock.class);
	}

	public String getName() {
		return "getDeclaringClass()";
	}

}
